package com.taobao.search.model.pojo;

import com.taobao.search.model.po.Goods;
import lombok.Data;
import lombok.NoArgsConstructor;


// 字段和索引库一致
@Data
@NoArgsConstructor
public class GoodsDoc {
    private Integer goodsId;
    private Integer storeId;
    private String videoUrl;
    private String imgList;
    private String title;
    private String imgUrl;
    private Float price;
    private String content;
    private String remark;
    private Float discount;
    private String types; // 更改为标准的驼峰命名法
    private String shangpu;
    private String url;
    private Integer monthSale;
    private String foodTag;
    private Integer _count;
    private String zhekou;
    private Float daoshou;
    private String evaluateId; //  评价id
    private String detailsId;   //  详情id
    private String recommendId;   // 推荐id
    private Integer logistics; // 物流与权益（0包邮/1不包邮）


    public GoodsDoc(Goods goods) {
        this.goodsId = goods.getGoodsId();
        this.storeId = goods.getStoreId();
        this.videoUrl = goods.getVideoUrl();
        this.imgList = goods.getImgList();
        this.title = goods.getTitle();
        this.imgUrl = goods.getImgUrl();
        this.price = goods.getPrice();
        this.content = goods.getContent();
        this.remark = goods.getRemark();
        this.discount = goods.getDiscount();
        this.types = goods.getTypes();
        this.shangpu = goods.getShangpu();
        this.url = goods.getUrl();
        this.monthSale = goods.getMonthSale();
        this.foodTag = goods.getFoodTag();
        this._count = goods.get_count();
        this.zhekou = goods.getZhekou();
        this.daoshou = goods.getDaoshou();
        this.evaluateId = goods.getEvaluateId();
        this.detailsId = goods.getDetailsId();
        this.recommendId = goods.getRecommendId();
        this.logistics = goods.getLogistics();

    }
}
